OCLOperators maxLength
Created by Lars.olofsson on 2020-06-29 · Last edited by Peter.byaruhanga on 2025-12-10.
Returns the maximum length allowed for a string attribute.
Useful for cutting a string to fit an attribute and avoiding SQL errors when saving.
Example
Given a Class Car with string attribute Name
Car.allInstances->first.Name.maxLengthThis will return the maximum length for the string attribute Name
